package com.zkh.myframe.annotation;

import com.zkh.myframe.enumeration.annotation.KeyType;

/**
 * 实体类@Table注解各属性值组成的对象
 * @author zkh
 */
public class Entity {
	private String tablename;	//表名
	private String key;			//主键
	private KeyType keyvalue;	//主键值生成方式
	private String sequence;	//序列名
	
	public Entity(){}
	public Entity(String tablename, String key, KeyType keyvalue, String sequence){
		this.tablename = tablename;
		this.key = key;
		this.keyvalue = keyvalue;
		this.sequence = sequence;
	}
	
	/**
	 * 获取表名
	 * @return
	 */
	public String getTablename() {
		return tablename;
	}
	public void setTablename(String tablename) {
		this.tablename = tablename;
	}
	/**
	 * 获取主键
	 * @return
	 */
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	/**
	 * 获取主键值生成方式
	 * @return
	 */
	public KeyType getKeyvalue() {
		return keyvalue;
	}
	public void setKeyvalue(KeyType keyvalue) {
		this.keyvalue = keyvalue;
	}
	/**
	 * 获取序列名
	 * @return
	 */
	public String getSequence() {
		return sequence;
	}
	public void setSequence(String sequence) {
		this.sequence = sequence;
	}
	@Override
	public String toString() {
		return "TableEntity [tablename=" + tablename + ", key=" + key
				+ ", keyvalue=" + keyvalue + ", sequence=" + sequence + "]";
	}
}
